document.addEventListener('DOMContentLoaded', function() {
  var likesbtn = document.getElementById('likes-btn')
  likesbtn.addEventListener('click', function() {
    fetch(
      '/images/likes/' + likesbtn.dataset.imageid,
      {method: 'POST', body: {}}
    ).then(response => response.json())
    .then(resp => {
      console.log(resp)
    })
  })
})